package com.control.qct.businesssteward.utils;

import java.text.DecimalFormat;

/**
 * 保留一 到 五位小数
 * Created by Administrator on 2017/9/22 0022.
 */

public class DecimalFormatUtils {
    public static String DecimalFormatOne(double num) {
        return new DecimalFormat("######0.0").format(num);
    }

    public static String DecimalFormatTwo(double num) {
        return new DecimalFormat("######0.00").format(num);
    }

    public static String DecimalFormatThree(double num) {
        return new DecimalFormat("######0.000").format(num);
    }

    public static String DecimalFormatFour(double num) {
        return new DecimalFormat("######0.0000").format(num);
    }

    public static String DecimalFormatFive(double num) {
        return new DecimalFormat("######0.00000").format(num);
    }
}
